package com.java.exer1;

/**
 * @author shkstart
 * @create 2021-01-11 10:35
 */
public class StringTest_8 {
    public static void main(String[] args) {

        String s1 = "edamwoeemfoemeeqdq";
        int index = 0;
        int count = 0;
        System.out.println(s1.length());
        while (true) {
            index = s1.indexOf('e', index);
            if (index != -1) {
                count++;
            }

            index += 1;

            if (index == s1.length()) {
                break;
            }

        }
        System.out.println(count);
    }
}

